// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PROD_WO_TASK
// * CreateDate    : 2014-06-05 18:30:23
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:23
// * LastChanger   : 2014-06-05 18:30:23
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class ProdWoTaskEntity : EntityBase
    {
        public ProdWoTaskTable TableSchema
        {
            get
            {
                return ProdWoTaskTable.Current;
            }
		}
		
		public ProdWoTaskEntity()
        {

        }
		
		public ProdWoTaskEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.WoId = Convert.ToString(CommonFunctions.ToObject(dr["WO_ID"]));
			this.Sequence = Convert.ToInt32(CommonFunctions.ToObject(dr["SEQUENCE"]));
			this.TechnicId = Convert.ToString(CommonFunctions.ToObject(dr["TECHNIC_ID"]));
			this.UserNo = Convert.ToString(CommonFunctions.ToObject(dr["USER_NO"]));
			this.ReqQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["REQ_QTY"]));
			this.ReqTimeFrom = Convert.ToDateTime(CommonFunctions.ToObject(dr["REQ_TIME_FROM"]));
			this.ReqTimeTo = Convert.ToDateTime(CommonFunctions.ToObject(dr["REQ_TIME_TO"]));
			this.ReportedQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["REPORTED_QTY"]));
			this.ReportedBy = Convert.ToString(CommonFunctions.ToObject(dr["REPORTED_BY"]));
			this.ReportedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["REPORTED_DATE"]));
			this.WorkgroupNo = Convert.ToString(CommonFunctions.ToObject(dr["WORKGROUP_NO"]));
			this.ReportworkBaseQty = Convert.ToInt32(CommonFunctions.ToObject(dr["REPORTWORK_BASE_QTY"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }
		
		public ProdWoTaskEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.WoId = Convert.ToString(CommonFunctions.ToObject(dr["WO_ID"]));
			this.Sequence = Convert.ToInt32(CommonFunctions.ToObject(dr["SEQUENCE"]));
			this.TechnicId = Convert.ToString(CommonFunctions.ToObject(dr["TECHNIC_ID"]));
			this.UserNo = Convert.ToString(CommonFunctions.ToObject(dr["USER_NO"]));
			this.ReqQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["REQ_QTY"]));
			this.ReqTimeFrom = Convert.ToDateTime(CommonFunctions.ToObject(dr["REQ_TIME_FROM"]));
			this.ReqTimeTo = Convert.ToDateTime(CommonFunctions.ToObject(dr["REQ_TIME_TO"]));
			this.ReportedQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["REPORTED_QTY"]));
			this.ReportedBy = Convert.ToString(CommonFunctions.ToObject(dr["REPORTED_BY"]));
			this.ReportedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["REPORTED_DATE"]));
			this.WorkgroupNo = Convert.ToString(CommonFunctions.ToObject(dr["WORKGROUP_NO"]));
			this.ReportworkBaseQty = Convert.ToInt32(CommonFunctions.ToObject(dr["REPORTWORK_BASE_QTY"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return ProdWoTaskTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(ProdWoTaskTable.C_ID)); }
            set { SetData(ProdWoTaskTable.C_ID, value); }
        }
		
        [DataMember]
        public string WoId
        {
            get { return Convert.ToString(GetData(ProdWoTaskTable.C_WO_ID)); }
            set { SetData(ProdWoTaskTable.C_WO_ID, value); }
        }
		
        [DataMember]
        public int Sequence
        {
            get { return Convert.ToInt32(GetData(ProdWoTaskTable.C_SEQUENCE)); }
            set { SetData(ProdWoTaskTable.C_SEQUENCE, value); }
        }
		
        [DataMember]
        public string TechnicId
        {
            get { return Convert.ToString(GetData(ProdWoTaskTable.C_TECHNIC_ID)); }
            set { SetData(ProdWoTaskTable.C_TECHNIC_ID, value); }
        }
		
        [DataMember]
        public string UserNo
        {
            get { return Convert.ToString(GetData(ProdWoTaskTable.C_USER_NO)); }
            set { SetData(ProdWoTaskTable.C_USER_NO, value); }
        }
		
        [DataMember]
        public decimal ReqQty
        {
            get { return Convert.ToDecimal(GetData(ProdWoTaskTable.C_REQ_QTY)); }
            set { SetData(ProdWoTaskTable.C_REQ_QTY, value); }
        }
		
        [DataMember]
        public DateTime ReqTimeFrom
        {
            get { return Convert.ToDateTime(GetData(ProdWoTaskTable.C_REQ_TIME_FROM)); }
            set { SetData(ProdWoTaskTable.C_REQ_TIME_FROM, value); }
        }
		
        [DataMember]
        public DateTime ReqTimeTo
        {
            get { return Convert.ToDateTime(GetData(ProdWoTaskTable.C_REQ_TIME_TO)); }
            set { SetData(ProdWoTaskTable.C_REQ_TIME_TO, value); }
        }
		
        [DataMember]
        public decimal ReportedQty
        {
            get { return Convert.ToDecimal(GetData(ProdWoTaskTable.C_REPORTED_QTY)); }
            set { SetData(ProdWoTaskTable.C_REPORTED_QTY, value); }
        }
		
        [DataMember]
        public string ReportedBy
        {
            get { return Convert.ToString(GetData(ProdWoTaskTable.C_REPORTED_BY)); }
            set { SetData(ProdWoTaskTable.C_REPORTED_BY, value); }
        }
		
        [DataMember]
        public DateTime ReportedDate
        {
            get { return Convert.ToDateTime(GetData(ProdWoTaskTable.C_REPORTED_DATE)); }
            set { SetData(ProdWoTaskTable.C_REPORTED_DATE, value); }
        }
		
        [DataMember]
        public string WorkgroupNo
        {
            get { return Convert.ToString(GetData(ProdWoTaskTable.C_WORKGROUP_NO)); }
            set { SetData(ProdWoTaskTable.C_WORKGROUP_NO, value); }
        }
		
        [DataMember]
        public int ReportworkBaseQty
        {
            get { return Convert.ToInt32(GetData(ProdWoTaskTable.C_REPORTWORK_BASE_QTY)); }
            set { SetData(ProdWoTaskTable.C_REPORTWORK_BASE_QTY, value); }
        }
		
        [DataMember]
        public string Status
        {
            get { return Convert.ToString(GetData(ProdWoTaskTable.C_STATUS)); }
            set { SetData(ProdWoTaskTable.C_STATUS, value); }
        }
		
		#endregion
	}
	
	
}	

